package com.bdqn.ssm.controller;

import com.bdqn.ssm.pojo.Account;
import com.bdqn.ssm.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 27435
 * @Date 2025/1/215:49
 * @Version 1.0
 */

@RestController
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private AccountService accountService;

    @GetMapping("/{id}")
    public Account getAccount(@PathVariable("id") Integer id){
        Account account = accountService.getAccountById(id);
        return account;
    }

}
